package com.legal.domain.po;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>用户刷题记录表</p>
 * <p>记录用户每次刷题的整体情况统计</p>
 *
 * @author xiaopeng
 * @since 2025-06-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_practice_record")
@Schema(name = "PracticeRecord", description = "用户刷题记录信息")
public class PracticeRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID",
            example = "1001")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "刷题记录唯一编号",
            example = "REC001")
    private String recordNo;

    @Schema(description = "用户唯一标识",
            example = "US20264362")
    private String userNo;

    @Schema(description = "题库分类编号",
            example = "CAT001")
    private String categoryNo;

    @Schema(description = "本次刷题总题数",
            example = "5")
    private Integer totalQuestions;

    @Schema(description = "答对题目数量",
            example = "4")
    private Integer correctCount;

    @Schema(description = "本次得分",
            example = "80")
    private BigDecimal score;

    @Schema(description = "刷题开始时间",
            example = "2025-06-28")
    private LocalDateTime startTime;

    @Schema(description = "刷题结束时间",
            example = "2025-06-28")
    private LocalDateTime endTime;

    @Schema(description = "持续时间(秒)",
            example = "1800")
    private Integer duration;

    @Schema(description = "记录创建时间",
            example = "2025-06-28",
            accessMode = Schema.AccessMode.READ_ONLY)
    private LocalDateTime createTime;
}